package com.tqjc.system.core.pipeline.thread;

import com.tqjc.system.common.enums.CarPLCInfoEnum;
import com.tqjc.system.core.util.SpringUtils;
import com.tqjc.system.system.entity.SysCarThreadLogEntity;
import com.tqjc.system.system.service.SysCarThreadLogService;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;

/**
 * @description: 天车进程记录线程
 * @Author: 86195
 * @Date: 2023/12/19 10:15
 * @param:
 * @return:
 **/
@Data
@Slf4j
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class CarProgressLogThread extends Thread{


    private String carInfo;

    private String msg;




    @Override
    public void run() {
        SysCarThreadLogService service = SpringUtils.getBean("SysCarThreadLogService");
        Long idKey = null;
        SysCarThreadLogEntity entity = SysCarThreadLogEntity.builder().carDesc(carInfo).currProgress(msg).build();
        service.save(entity);
    }
}
